#include <bits/stdc++.h>
using namespace std;
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
using ll = long long;
void solve()
{
    //1 0 1 0 1 0 1 0 
    ll l ,r;
    cin >> l >> r;
    cout <<( (r - l + 1) >= 2 ? 2 : 1);
}
int main()
{
    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
   return 0;
}
